#include "timethread.h"
#include <QTime>
#include <QDebug>

TimeThread::TimeThread(QObject *parent)
    : QThread(parent)
{
}

void TimeThread::stop()
{
    m_running = false;
}

void TimeThread::run()
{
    while (m_running) {
        QString time = QTime::currentTime().toString("hh:mm:ss");
        emit sendTime(time);
        qDebug() << time;
        QThread::sleep(1);
    }
}
